e-Content by



Ms. P. Saranya & Ms. V. Vanthana
Asst. Professor
MCA Department
S.F.R.College For Women,Sivakasi.
JAVA
Packages & Interfaces

Java Packages and Interfaces

  • Defining Package

    Java provides a mechanism for partitioning the class name space into more manageable chunks. To create a package, include a package command as the first statement in a Java source file. … Read more »

  • Importing Package

    Java includes the import statement to bring certain classes, or entire packages, into visibility. Once imported, a class can be referred to directly, using only its name… Read more »

  • Package example

    Example program to define and import a package. … Read more »

  • Defining Interfaces

    Interface can be used to specify what a class must do, but not how it does it. Interfaces are similar to classes, but they lack instance variables, and their methods are declared without any body. … Read more »

  • Implementing Interface

    Once an interface has been defined, one or more classes can implement that interface. To implement an interface, include the implements clause in a class definition, and then create the methods defined by the interface … Read more »

  • Extending Interfaces

    One interface can inherit another by use of the keyword extends. The syntax is the same as for inheriting classes. … Read more »